package com.ruoyi.car.service.carmanage.impl;

import com.car.pojo.TbCarType;
import com.ruoyi.car.mapper.carmanage.TbCarTypeMapper;
import com.ruoyi.car.service.carmanage.TbCarTypeService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TbCarTypeServiceImpl implements TbCarTypeService {
    @Autowired
    private TbCarTypeMapper tbCarTypeMapper;
    @Override
    public List<TbCarType> findAll(TbCarType tbCarType) {
        return tbCarTypeMapper.findAll(tbCarType);
    }

    /**
     * 查询
     * @param id
     * @return
     */
    @Override
    public TbCarType selectTbCarTypeById(Long id)
    {
        return tbCarTypeMapper.selectTbCarTypeById(id);
    }
    /**
     * 新增
     * @param tbCarType
     * @return 结果
     */
    @Override
    public int insertTbCarType(TbCarType tbCarType)
    {
        return tbCarTypeMapper.insertTbCarType(tbCarType);
    }

    /**
     * 修改
     *
     * @param tbCarType
     * @return 结果
     */
    @Override
    public int updateTbCarType(TbCarType tbCarType)
    {
        return tbCarTypeMapper.updateTbCarType(tbCarType);
    }

    /**
     * 删除
     *
     * @param ids
     * @return 结果
     */
    @Override
    public int deleteTbCarTypeByIds(String ids)
    {
        return tbCarTypeMapper.deleteTbCarTypeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除
     *
     * @param id
     * @return 结果
     */
    @Override
    public int deleteTbCarTypeById(Long id)
    {
        return tbCarTypeMapper.deleteTbCarTypeById(id);
    }
}
